package com.shiro.enums;

/**
 * Created with IntelliJ IDEA.
 * User: dengpeng
 * Date: 2018/6/29
 * Time: 10:17
 * Description: No Description
 */
public enum ResultEnum {

    SUCCESS("000000","操作成功"),
    FAIL("999999","操作失败"),
    INVALID_ARGUMENTS("000001","参数错误!"),
    URL_NOT_FOUND("000404","未找到请求地址"),

    LoginNameOrPassWordError("000100", "用户名或者密码错误！"),
    EMAILUSED("000101","该邮箱已被注册"),
    USERNAMEUSED("000102","该登录名称已存在"),
    LINKOUTDATED("000104","该链接已过期，请重新请求"),
    PASSWORDERROR("000105","密码输入错误"),
    USERNAMELENGTHLIMIT("000106","用户名长度超限"),
    LOGINNAMENOTEXISTS("000107","该用户未注册"),
    USERNAMESAME("000108","新用户名与原用户名一致"),

    FILEEMPTY("000400","上传文件为空"),
    LIMITPICTURESIZE("000401","图片大小必须小于2M"),
    LIMITPICTURETYPE("000402","图片格式必须为'jpg'、'png'、'jpge'、'gif'、'bmp'");


    private String code;
    private String msg;

    private ResultEnum(String code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {

        return code;
    }

    public void setCode(String code) {

        this.code = code;
    }

    public String getMsg() {

        return msg;
    }

    public void setMsg(String msg) {

        this.msg = msg;
    }
}
